import Vue from 'vue'
import Router from 'vue-router'
import index from '../components/index'
import MyCenter from '../components/My_center.vue'
import BuyACar from '../components/Buy_Acar.vue'
import SellTheCar from '../components/Sell_TheCar.vue'
import Cheats from '../components/Cheats.vue'
import Commod from '../components/Commod.vue'
import Search from '../components/car_search.vue'
import Login from '../components/login.vue'
import Register from '../components/register.vue'
import Login_center from '../components/login_center.vue'
import Browse from '../components/browse_record.vue'
import dayRecommend from '../components/day_Recommend.vue'
import CarLoan from '../components/CarLoan.vue'
import ArticleTemplate from '../components/Article_template.vue'
import llegal from '../components/llegal.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'index',
      component: index
    },
    {
      path: '/index',
      name: 'indexs',
      component: index
    }, {
      path: '/MyCenter',
      name: 'MyCenter',
      component: MyCenter
    }, {
      path: '/BuyACar',
      name: 'BuyACar',
      component: BuyACar

    }, {
      path: '/SellTheCar',
      name: 'SellTheCar',
      component: SellTheCar
    }, {
      path: '/Cheats',
      name: 'Cheats',
      component: Cheats
    }, {
      path: '/Commods/:workid',
      name: 'Commods',
      component: Commod
    }, {
      path: '/Search',
      name: 'Search',
      component: Search
    }, {
      path: '/Login',
      name: 'Login',
      component: Login
    },
    {
      path: '/Register',
      name: 'Register',
      component: Register
    }, {
      path: '/Login_center',
      name: 'Login_center',
      component: Login_center
    }, {
      path: '/Browse',
      name: 'Browse',
      component: Browse
    }, {
      path: '/dayRecommend',
      name: 'dayRecommend',
      component: dayRecommend
    }, {
      path: '/CarLoan',
      name: 'CarLoan',
      component: CarLoan
    }, {
      path: '/ArticleTemplate/:workid',
      name: 'ArticleTemplate',
      component: ArticleTemplate
    }, {
      path: '/llegal',
      name: 'llegal',
      component: llegal
    }
  ],
  scrollBehavior () {
    return {x: 0, y: 0}
  }
})
